package com.satan.fmmall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.satan.fmmall.entity.Product;
import com.satan.fmmall.vo.ProductVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductMapper extends BaseMapper<Product> {
    public List<ProductVo> selectRecommendProducts();
    //查询指定一级类别下销量最高的六个商品
    public List<ProductVo> selectTop6ByCategory(Integer categoryId);
    /*根据三级分类ID分页查询商品信息*/
    public List<ProductVo> selectProductByCategoryId(@Param("categoryId") Integer categoryId,@Param("start") Integer start,@Param("limit") Integer limit);
    public List<ProductVo> selectProductByKeyword(@Param("keyword") String keyword,@Param("start") Integer start,@Param("limit") Integer limit);
    public List<ProductVo> selectProducts();

}
